package com.boliq.lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.boliq.lol.R;
import com.boliq.lol.adapter.NewsArticleAdapter;
import com.boliq.lol.base.BaseFragment;
import com.boliq.lol.bean.NewsArticleBean;


public class NewsArticleFragment2 extends BaseFragment {

    private RecyclerView mRecyclerView;
    private NewsArticleAdapter mAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.item_news_article2;
    }

    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.rv_menu_list);
    }

    @Override
    protected void initData() {
        NewsArticleBean nb1=new NewsArticleBean("《英雄麦克疯》:忍界大战2.0 369一锤定音",R.drawable.icon_line1,"LOL","英雄联盟赛事官方","73");
        NewsArticleBean nb2=new NewsArticleBean("[反向解说42]重筹AD荣光Xiaohu义不容辞！",R.drawable.icon_line2,"LOL","聒噪的山海君","24");
        NewsArticleBean nb3=new NewsArticleBean("新忍村大战--IGvsTES复盘",R.drawable.icon_line24,"LOL","小XIxi","50");

        mAdapter = new NewsArticleAdapter();
        mAdapter.addData(nb1);
        mAdapter.addData(nb2);
        mAdapter.addData(nb3);



    }

    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(mAdapter);

    }

    @Override
    protected void bindEvent() {

    }
}
